import json
from decimal import Decimal
import MySQLdb
def default(obj):
    if isinstance(obj, Decimal):
        return str(obj)
    raise TypeError
conn=MySQLdb.connect(host='182.92.96.120',user='zhuge',passwd='zhuge1116',db='test',port=3306,charset="utf8")
cur = conn.cursor(cursorclass=MySQLdb.cursors.DictCursor)
cur.execute('select * from house_sell where id =7')
result=cur.fetchone()
result=json.dumps(result,default=default)
print result
